/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 38917
 * Date: 2025-04-05
 * Time: 22:51
 */
public class Solution {
    public static int climbStairs(int n) {
        int[] upstair = new int[n + 1];
        upstair[0] = 1;
        upstair[1] = 1;
        for(int i = 2; i <= n; i++) {
            upstair[i] = upstair[i - 1] + upstair[i - 2];
        }
        return upstair[n];
    }
    public static void main(String[] args) {
        int ret = climbStairs(5);
        System.out.println(ret);
    }
}